#!/bin/bash

# See the note near the top of the install script describing how the
# XCode/gcc combinations need to be handled
xcode_3=`xcodebuild -version | grep "Xcode 3"`
if [ "$xcode_3" != "" ]; then
    /usr/bin/gcc-4.0 $*
else
    # If we have 4.2 with the version explicitly specified, use
    # it. Otherwise fall back to default gcc and pray.
    found_gcc_42=`which gcc-4.2`
    if [ "$found_gcc_42" != "" ]; then
        /usr/bin/gcc-4.2 $*
    else
        /usr/bin/gcc $*
    fi
fi
